gtkgesture: Do not coalesce hold events with other touchpad gestures
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 5 Aug 2022 09:24:58 +0000 (11:24 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 5 Aug 2022 17:25:13 +0000 (19:25 +0200)
commit023924bca90248d1006bdc0d67d54827c387412e
tree77b061367b350a197aec482d2af9f3db9a976df7
parentaf6432aa6783c00e5e4fd0d9f7fbf1ef8de2606a
gtkgesture: Do not coalesce hold events with other touchpad gestures

This delaying of the cancel event was made to avoid intermediate cancellation
for >=2fg hold gestures followed by pinch/swipe gestures, and it worked as
long as everything was considered to have the same sequence.

Since each pinch/swipe pointer gesture now gets its own sequence, this no
longer applies, nor works. This results in zoom/rotate/swipe gestures being
stuck since the sequence for the touchpad events changes mid-gesture.

Sticking to this pattern of giving touchpad gestures their own sequence,
these hold events cannot be assumed to coalesce with other touchpad gestures,
it is better to let it propagate altogether so that both the hold gesture
and the incoming gesture trigger coherent begin and end/cancel phases.

In the worst case, this results in "::begin, ::cancel, ::begin , ..." before
triggering a touchpad gesture, but the extra begin/cancel ought to be a safe
no-op in widgets.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5003
gtk/gtkgesture.c